using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class GameManager : Singleton<GameManager>
{
    public int rescuedPeople;
    
    private void Update()
    {
        GameOver();
    }

    private void GameOver()
    {
        if (AirConsumeManager.Instance.airAmount <= 0)
        {
            EventHandler.CallReducedPressure("没有氧气了, 死亡");
            EventHandler.CallEndDive();
        }

        if (rescuedPeople == 3)
        {
            SceneManager.LoadSceneAsync("End Scene");
        }
    }
}
